#coding=utf-8
'''
Created on 2015��9��25��

@author: 404158
'''
import sys
sys.path.append('D:\eclipse\luyouqi\src\dlink615')

from selenium import webdriver
import time
import testcase.Dlink615.channeltest
import common.connnecthost
import os

def Login():
    #Driver = webdriver.Firefox()
    iedriver = r"C:\Program Files\Internet Explorer\IEDriverServer.exe"
    os.environ["webdriver.ie.driver"] = iedriver
    Driver = webdriver.Ie(iedriver)
    Driver.implicitly_wait(10)
    Url = common.connnecthost.rounter_IP_connection()
    Driver.get(Url)
    Driver.maximize_window()
    Driver.find_element_by_id("login_n").clear()
    time.sleep(2)
    Driver.find_element_by_id("login_n").send_keys("admin")
    time.sleep(1)
    Driver.find_element_by_id("login_pass").clear()
    time.sleep(1)
    Driver.find_element_by_id("Login").click()
    time.sleep(3)
    Driver.find_element_by_xpath("//input[@name='exit']").click()
    time.sleep(2)
    return Driver
'''
if __name__ == '__main__':
    Login()
'''